<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <ul id="menu">
        <li id="home">home</li>
        <li id="dashboard">dashboard</li>
        <li id="report">report</li>
    </ul>
    <p id="context"> </p>

    <script>
        document.querySelector('#menu').addEventListener('click', function (e) {
            let target = e.target;
            switch (target.id) {
                case 'home':
                    document.querySelector('#context').innerHTML = 'home clicked';
                    break;
                case 'dashboard':
                    document.querySelector('#context').innerHTML = 'dashboard clicked';
                    break;
                case 'report':
                    document.querySelector('#context').innerHTML = 'report clicked';
                    break;
            }
        });
    </script>
</body>

</html>